﻿using UnityEngine;
using System.Collections;

public class test_uv : MonoBehaviour
{
    public float x1speed = 0;
    public float y1speed = 0;

    
    private Vector2 v1;
    private Renderer m_renderer;
    private Material m_material;

    void Start()
    {
        v1 = Vector2.zero;
        m_renderer = GetComponent<Renderer>();
        m_material = m_renderer.materials[0];
    }

    void FixedUpdate()
    {	
	    v1.x += Time.fixedDeltaTime*x1speed;
        v1.y += Time.fixedDeltaTime*y1speed;
        m_material.mainTextureOffset = v1;
    }
}
